package com.nantian.logic.controller.mainControl.authenControl;

import com.cuit.springboot.gdao.authen.AuthenMapper;
import com.cuit.springboot.gentry.authen.Authen;
import com.nantian.logic.utils.UniversalResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping(value="/authentication")
public class AuthenController {

@Autowired
    AuthenMapper authenMapper;

    @RequestMapping(value="/stucard")
    public UniversalResult findStuAuthenList(){
        List list=authenMapper.selectStuAuthen();
        return new UniversalResult(UniversalResult.SUCCESS,"查询学生认证申请成功",list);
    }

    @RequestMapping(value="/busilicense")
    public UniversalResult findBusiAuthenList(){
        List list=authenMapper.selectBusiAuthen();
         return new UniversalResult(UniversalResult.SUCCESS,"查询企业营业执照认证申请成功",list);
    }

    @RequestMapping(value="/confirm")
    public UniversalResult confirmAuthen(@RequestBody Authen authen){
        int ret=authenMapper.confirmAuthen(authen);
        return new UniversalResult(UniversalResult.SUCCESS,"认证成功");
    }
}
